home *** CD-ROM | disk | FTP | other *** search
/ CD Fun House 1 / CD Fun House (Wayzata Technology).iso / •Word Games• / Renaissance Man •••• / Renaissance Man ееее / background_2678.txt < prev    next >
Text File  |  1990-10-02  |  12KB  |  488 lines

  1. -- background: 2678 from stack: in
  2. -- bmap block id: 4154
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: game
  6. ----- HyperTalk script -----
  7. on openBackground
  8.   push recent card
  9. end openBackground
  10.  
  11.  
  12.  
  13.  
  14.  
  15. -- part 59 (field)
  16. -- low flags: 01
  17. -- high flags: 2000
  18. -- rect: left=326 top=121 right=148 bottom=505
  19. -- title width / last selected line: 0
  20. -- icon id / first selected line: 0 / 0
  21. -- text alignment: 0
  22. -- font id: 5
  23. -- text size: 14
  24. -- style flags: 16384
  25. -- line height: 18
  26. -- part name: newletters
  27.  
  28.  
  29. -- part 19 (field)
  30. -- low flags: 01
  31. -- high flags: 0000
  32. -- rect: left=325 top=175 right=213 bottom=506
  33. -- title width / last selected line: 0
  34. -- icon id / first selected line: 0 / 0
  35. -- text alignment: 0
  36. -- font id: 5
  37. -- text size: 14
  38. -- style flags: 0
  39. -- line height: 18
  40. -- part name: WrongLetters
  41.  
  42.  
  43. -- part 54 (field)
  44. -- low flags: 01
  45. -- high flags: 2000
  46. -- rect: left=322 top=224 right=288 bottom=508
  47. -- title width / last selected line: 0
  48. -- icon id / first selected line: 0 / 0
  49. -- text alignment: 1
  50. -- font id: 5
  51. -- text size: 14
  52. -- style flags: 0
  53. -- line height: 18
  54. -- part name: response
  55.  
  56.  
  57. -- part 58 (field)
  58. -- low flags: 00
  59. -- high flags: 0002
  60. -- rect: left=468 top=85 right=107 bottom=498
  61. -- title width / last selected line: 0
  62. -- icon id / first selected line: 0 / 0
  63. -- text alignment: 0
  64. -- font id: 5
  65. -- text size: 14
  66. -- style flags: 0
  67. -- line height: 18
  68. -- part name: GuessLetters
  69. ----- HyperTalk script -----
  70. on closeField
  71.   global theWordHM, wrongguessesHM, totalWrongGuessesHM
  72.   global EightTries, SixTries
  73.  
  74.   put empty into field "response"
  75.   if EightTries then put 8 into MaxErrors
  76.   if SixTries then put 6 into MaxErrors
  77.  
  78.   --get rid of returns and spaces in entry box
  79.   repeat for the number of chars in field "guessLetters"
  80.     if last char of field "guessLetters" is return OR last char of field "guessLetters" is space then
  81.       put empty into last char of field "guessLetters"
  82.     end if
  83.   end repeat
  84.  
  85.   --if user keeps guessing even after guesses are up
  86.   --have to take care of this bec HC gets upset when
  87.   --asked to hide fields that don't exist
  88.   if wrongGuessesHM >= MaxErrors then
  89.     rudetune
  90.     put "Too many guesses!  Choose another word." into field "response"
  91.     exit closeField
  92.   end if
  93.  
  94.   --take care of users who enter more than one letter
  95.   if the length of field "guessLetters" >1 then
  96.     rudetune
  97.     put "Only one letter at a time, please." & return & "Try again." into field "response"
  98.     put empty into field "guessLetters"
  99.     get the loc of field "guessLetters"
  100.     click at it
  101.     exit closeField
  102.   end if
  103.  
  104.   --take care of repeating a guess
  105.   if field "guessLetters" is in field "wrongletters" or field "guessLetters" is in field "newletters" then
  106.     rudetune
  107.     put "You‚Äôve already guessed ‚Äú" & field "guessLetters" & ".‚Äù" & return & "Try again." into field "response"
  108.     put empty into field "guessLetters"
  109.     get the loc of field "guessLetters"
  110.     click at it
  111.     exit closeField
  112.   end if
  113.  
  114.  
  115.   --if user chooses right letter
  116.   if theWordHM contains field "guessLetters" then
  117.     repeat with x = 1 to the number of chars of theWordHM
  118.       if char x of theWordHM = field "guessLetters" then
  119.         put char x of theWordHM into char x of field "newletters"
  120.         righttune
  121.       end if
  122.     end repeat
  123.   else
  124.     --if user chooses wrong letter
  125.     put field "guessLetters" & space & space after field "wrongLetters"
  126.     add 1 to wrongGuessesHM
  127.     add 1 to totalWrongGuessesHM
  128.     wrongtune
  129.  
  130.     --hide masking fields to show hanged man
  131.     set the numberFormat to 0
  132.     put wrongGuessesHM into mistakeNumber
  133.     put "error" & mistakenumber into whichMask
  134.     --if user chose eight tries
  135.     if EightTries then hide field whichMask
  136.     -- if user chose six tries
  137.     if SixTries then
  138.       if mistakenumber < 3 then hide field whichMask
  139.       if mistakenumber = 3 OR mistakenumber = 4 then
  140.         put mistakenumber + 2 into temp
  141.         put "error" & temp into whichOtherMask
  142.         set the lockscreen to true
  143.         hide field whichMask
  144.         hide field whichOtherMask
  145.         set the lockscreen to false
  146.       end if
  147.       if mistakenumber > 4 then
  148.         add 2 to mistakenumber
  149.         put "error" & mistakenumber into whichMask
  150.         hide field whichMask
  151.       end if
  152.     end if --if six tries
  153.   end if  --if guessed right letter, else
  154.  
  155.   --if user has guessed all the right letters
  156.   if field "newletters" = theWordHM then
  157.     --if perfect attempt
  158.     if wrongGuessesHM is empty then
  159.       put "Perfect!" into field "response"
  160.     else
  161.       put any line of field "Congratulations" into field "response"
  162.     end if
  163.     happytune
  164.     --do scoring
  165.     set the numberFormat to 0.00
  166.     put totalWrongGuessesHM / field "WordNumber" into field "average"
  167.   end if
  168.  
  169.   --if user has blown it
  170.   if wrongGuessesHM = MaxErrors then
  171.     dirge
  172.     put any line of field "regrets" & return & "‚Äú" & theWordHM & ".‚Äù" into field "response"
  173.     --do scoring
  174.     set the numberFormat to 0.00
  175.     put totalWrongGuessesHM/ field "WordNumber" into field "average"
  176.   end if
  177.  
  178.   put empty into field "guessLetters"
  179.   get the loc of field "guessLetters"
  180.   click at it
  181.  
  182. end closeField
  183.  
  184.  
  185.  
  186. -- part 71 (field)
  187. -- low flags: 01
  188. -- high flags: 0001
  189. -- rect: left=110 top=19 right=107 bottom=191
  190. -- title width / last selected line: 0
  191. -- icon id / first selected line: 0 / 0
  192. -- text alignment: 0
  193. -- font id: 3
  194. -- text size: 12
  195. -- style flags: 0
  196. -- line height: 16
  197. -- part name: error1
  198.  
  199.  
  200. -- part 72 (field)
  201. -- low flags: 01
  202. -- high flags: 0001
  203. -- rect: left=183 top=35 right=108 bottom=306
  204. -- title width / last selected line: 0
  205. -- icon id / first selected line: 0 / 0
  206. -- text alignment: 0
  207. -- font id: 3
  208. -- text size: 12
  209. -- style flags: 0
  210. -- line height: 16
  211. -- part name: error4
  212.  
  213.  
  214. -- part 73 (field)
  215. -- low flags: 01
  216. -- high flags: 0001
  217. -- rect: left=61 top=85 right=186 bottom=259
  218. -- title width / last selected line: 0
  219. -- icon id / first selected line: 0 / 0
  220. -- text alignment: 0
  221. -- font id: 3
  222. -- text size: 12
  223. -- style flags: 0
  224. -- line height: 16
  225. -- part name: error2
  226.  
  227.  
  228. -- part 74 (field)
  229. -- low flags: 01
  230. -- high flags: 0001
  231. -- rect: left=0 top=35 right=108 bottom=118
  232. -- title width / last selected line: 0
  233. -- icon id / first selected line: 0 / 0
  234. -- text alignment: 0
  235. -- font id: 3
  236. -- text size: 12
  237. -- style flags: 0
  238. -- line height: 16
  239. -- part name: error3
  240.  
  241.  
  242. -- part 75 (field)
  243. -- low flags: 01
  244. -- high flags: 0001
  245. -- rect: left=213 top=87 right=184 bottom=306
  246. -- title width / last selected line: 0
  247. -- icon id / first selected line: 0 / 0
  248. -- text alignment: 0
  249. -- font id: 3
  250. -- text size: 12
  251. -- style flags: 0
  252. -- line height: 16
  253. -- part name: error6
  254.  
  255.  
  256. -- part 76 (field)
  257. -- low flags: 01
  258. -- high flags: 0001
  259. -- rect: left=6 top=84 right=185 bottom=95
  260. -- title width / last selected line: 0
  261. -- icon id / first selected line: 0 / 0
  262. -- text alignment: 0
  263. -- font id: 3
  264. -- text size: 12
  265. -- style flags: 0
  266. -- line height: 16
  267. -- part name: error5
  268.  
  269.  
  270. -- part 77 (field)
  271. -- low flags: 01
  272. -- high flags: 0001
  273. -- rect: left=146 top=184 right=334 bottom=304
  274. -- title width / last selected line: 0
  275. -- icon id / first selected line: 0 / 0
  276. -- text alignment: 0
  277. -- font id: 3
  278. -- text size: 12
  279. -- style flags: 0
  280. -- line height: 16
  281. -- part name: error7
  282.  
  283.  
  284. -- part 78 (field)
  285. -- low flags: 01
  286. -- high flags: 0001
  287. -- rect: left=3 top=184 right=333 bottom=150
  288. -- title width / last selected line: 0
  289. -- icon id / first selected line: 0 / 0
  290. -- text alignment: 0
  291. -- font id: 3
  292. -- text size: 12
  293. -- style flags: 0
  294. -- line height: 16
  295. -- part name: error8
  296.  
  297.  
  298. -- part 80 (button)
  299. -- low flags: 00
  300. -- high flags: 2000
  301. -- rect: left=481 top=0 right=21 bottom=507
  302. -- title width / last selected line: 0
  303. -- icon id / first selected line: 20689 / 20689
  304. -- text alignment: 1
  305. -- font id: 5
  306. -- text size: 14
  307. -- style flags: 0
  308. -- line height: 18
  309. -- part name: Home
  310. ----- HyperTalk script -----
  311. on mouseUp
  312.   go home
  313. end mouseUp
  314.  
  315.  
  316.  
  317. -- part 81 (button)
  318. -- low flags: 00
  319. -- high flags: A002
  320. -- rect: left=321 top=318 right=340 bottom=420
  321. -- title width / last selected line: 0
  322. -- icon id / first selected line: 0 / 0
  323. -- text alignment: 1
  324. -- font id: 100
  325. -- text size: 14
  326. -- style flags: 0
  327. -- line height: 18
  328. -- part name: Another word
  329. ----- HyperTalk script -----
  330. on mouseUp
  331.   global theWordHM, noMusic
  332.  
  333.   if not noMusic then play "Harpsichord" ee c
  334.  
  335.   doNewWord
  336.  
  337.   set the locktext of field "newletters" of card "game" to false
  338.   put the number of chars in theWordHM into letterNumber
  339.   repeat for letterNumber
  340.     get the loc of field "newletters" of card "game"
  341.     click at it
  342.     type "-"
  343.   end repeat
  344.   set the locktext of field "newletters" of card "game" to true
  345.  
  346.   get the loc of field "guessLetters"
  347.   click at it
  348. end mouseUp
  349.  
  350.  
  351.  
  352. -- part 82 (button)
  353. -- low flags: 00
  354. -- high flags: 0000
  355. -- rect: left=479 top=316 right=342 bottom=505
  356. -- title width / last selected line: 0
  357. -- icon id / first selected line: 25002 / 25002
  358. -- text alignment: 1
  359. -- font id: 0
  360. -- text size: 12
  361. -- style flags: 0
  362. -- line height: 16
  363. -- part name: help
  364. ----- HyperTalk script -----
  365. on mouseUp
  366.   visual venetian blinds slowly
  367.   go to card id 3955
  368. end mouseUp
  369.  
  370.  
  371.  
  372. -- part 83 (button)
  373. -- low flags: 00
  374. -- high flags: A002
  375. -- rect: left=422 top=318 right=340 bottom=476
  376. -- title width / last selected line: 0
  377. -- icon id / first selected line: 0 / 0
  378. -- text alignment: 1
  379. -- font id: 100
  380. -- text size: 14
  381. -- style flags: 0
  382. -- line height: 18
  383. -- part name: Options
  384. ----- HyperTalk script -----
  385. on mouseUp
  386.   visual venetian blinds slowly
  387.   go to card id 5038
  388. end mouseUp
  389.  
  390.  
  391.  
  392. -- part 84 (field)
  393. -- low flags: 80
  394. -- high flags: 0007
  395. -- rect: left=15 top=211 right=265 bottom=282
  396. -- title width / last selected line: 0
  397. -- icon id / first selected line: 0 / 0
  398. -- text alignment: 0
  399. -- font id: 3
  400. -- text size: 12
  401. -- style flags: 0
  402. -- line height: 16
  403. -- part name: congratulations
  404.  
  405.  
  406. -- part 85 (field)
  407. -- low flags: 80
  408. -- high flags: 0007
  409. -- rect: left=15 top=273 right=327 bottom=282
  410. -- title width / last selected line: 0
  411. -- icon id / first selected line: 0 / 0
  412. -- text alignment: 0
  413. -- font id: 3
  414. -- text size: 12
  415. -- style flags: 0
  416. -- line height: 16
  417. -- part name: regrets
  418.  
  419.  
  420. -- part 87 (field)
  421. -- low flags: 01
  422. -- high flags: 0000
  423. -- rect: left=458 top=286 right=306 bottom=505
  424. -- title width / last selected line: 0
  425. -- icon id / first selected line: 0 / 0
  426. -- text alignment: 0
  427. -- font id: 100
  428. -- text size: 12
  429. -- style flags: 0
  430. -- line height: 16
  431. -- part name: average
  432.  
  433.  
  434. -- part 88 (field)
  435. -- low flags: 01
  436. -- high flags: 0000
  437. -- rect: left=376 top=286 right=306 bottom=405
  438. -- title width / last selected line: 0
  439. -- icon id / first selected line: 0 / 0
  440. -- text alignment: 0
  441. -- font id: 100
  442. -- text size: 12
  443. -- style flags: 0
  444. -- line height: 16
  445. -- part name: wordNumber
  446.  
  447.  
  448. -- part 94 (field)
  449. -- low flags: 81
  450. -- high flags: 2001
  451. -- rect: left=7 top=41 right=314 bottom=301
  452. -- title width / last selected line: 0
  453. -- icon id / first selected line: 0 / 0
  454. -- text alignment: 0
  455. -- font id: 0
  456. -- text size: 12
  457. -- style flags: 0
  458. -- line height: 16
  459. -- part name: YourOwnLabel
  460.  
  461.  
  462. -- part 92 (field)
  463. -- low flags: 80
  464. -- high flags: 0007
  465. -- rect: left=38 top=91 right=276 bottom=268
  466. -- title width / last selected line: 0
  467. -- icon id / first selected line: 0 / 0
  468. -- text alignment: 0
  469. -- font id: 3
  470. -- text size: 12
  471. -- style flags: 0
  472. -- line height: 16
  473. -- part name: YourOwnWordlist
  474.  
  475.  
  476. -- part 91 (field)
  477. -- low flags: 80
  478. -- high flags: 0007
  479. -- rect: left=31 top=244 right=314 bottom=259
  480. -- title width / last selected line: 0
  481. -- icon id / first selected line: 0 / 0
  482. -- text alignment: 0
  483. -- font id: 3
  484. -- text size: 12
  485. -- style flags: 0
  486. -- line height: 16
  487. -- part name: StandardWordlist
  488.